import React, { Component } from 'react'
import Child1 from './components/Child1'
import Child2 from './components/Child2'

export default class App extends Component {
  state={
    cmsg:''
  }
  render() {
    return (
      <div style={{display:'flex'}}>
        <Child1 callback={arg=>{
          this.setState({cmsg:arg})
        }}></Child1>
        <Child2 cmsg={this.state.cmsg}></Child2>
      </div>
    )
  }
}
